package Chapter08;

class Person3 {
	protected String name;
	protected String sex;
	
	Person3(String name,String sex){
	     this.name=name;
	     this.sex=sex;
	}
	
	public String toString(){
	     String s=new String();
	     s=name+"\t"+sex;
	     return s;
	}
}
	class Student extends Person3{
	     protected int age;
	     protected char grade;
	     
	     Student(String name,String sex,int age,char grade){
	    	 this(name, sex);
	         this.age=age;
	         this.grade=grade;
	     }
	     public Student(String name,String sex) {
	    	 super( name,sex);
	     }
	     void print() {
	     String s=new String();
	     s=super.toString();
	     s=s+"\t"+age+"\t"+grade; 
	     System.out.println(s);
	     }
	}
	